package com.ambulance.project.biz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 车辆管理表
 * </p>
 *
 * @author zr
 * @since 2020-04-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("biz_car")
@ApiModel(value="Car对象", description="车辆管理表")
public class Car extends Model<Car> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "车辆ID")
    @TableId(value = "carID", type = IdType.AUTO)
    private Integer carID;

    @ApiModelProperty(value = "医院标识")
    @TableField("uid")
    private Integer uid;

    @ApiModelProperty(value = "车辆类型 0普通救护车/1卒中救护车")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "车牌号")
    @TableField("vin")
    private String vin;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "最后出诊时间")
    @TableField("last_time")
    private LocalDateTime lastTime;

    @ApiModelProperty(value = "车辆部门")
    @TableField("depart")
    private String depart;

    @ApiModelProperty(value = "上次出车司机")
    @TableField("last_dispatch_driver_name")
    private String lastDispatchDriverName;

    @ApiModelProperty(value = "上次出车时间")
    @TableField("last_dispatch_time")
    private LocalDateTime lastDispatchTime;

    @ApiModelProperty(value = "上次出车司机标识")
    @TableField("last_dispatch_driverID")
    private Integer lastDispatchDriverid;

    @ApiModelProperty(value = "车速")
    @TableField("speed")
    private Integer speed;

    @ApiModelProperty(value = "胎压")
    @TableField("pressure")
    private String pressure;

    @ApiModelProperty(value = "氧气")
    @TableField("oxygen")
    private String oxygen;

    @ApiModelProperty(value = "车辆GPS")
    @TableField("car_gps")
    private String carGps;

    @ApiModelProperty(value = "报警信息")
    @TableField("alarm")
    private String alarm;

    @ApiModelProperty(value = "状态 0=可用 1=不可用，2已出车")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "宏电车辆标识")
    @TableField("id")
    private Integer id;

    @ApiModelProperty(value = "宏电车辆机构标识")
    @TableField("departId")
    private Integer departId;

    @ApiModelProperty(value = "宏电机构名称")
    @TableField("departName")
    private String departName;

    @ApiModelProperty(value = "宏电终端序列号")
    @TableField("termSn")
    private String termSn;

    @ApiModelProperty(value = "宏电过期时间")
    @TableField("expireDate")
    private LocalDateTime expireDate;

    @ApiModelProperty(value = "宏电注册时间")
    @TableField("registerDate")
    private LocalDateTime registerDate;

    @ApiModelProperty(value = "宏电最近修改时间")
    @TableField("modifyDate")
    private LocalDateTime modifyDate;

    @ApiModelProperty(value = "宏电是否启用车辆")
    @TableField("enableVehicle")
    private Integer enableVehicle;

    @ApiModelProperty(value = "宏电 是否在线，0不在，1在")
    @TableField("online")
    private Integer online;

    @ApiModelProperty(value = "车辆图片")
    @TableField("image")
    private String image;

    @ApiModelProperty(value = "数据回传时间")
    @TableField("callbackTime")
    private LocalDateTime callbackTime;

    @ApiModelProperty(value = "飞利浦房间号")
    @TableField("ultrasonicRoom")
    private String ultrasonicRoom;

    @ApiModelProperty(value = "网关标识")
    @TableField("gatwayId")
    private String gatwayId;

    @Override
    protected Serializable pkVal() {
        return this.carID;
    }

}
